{extend name="index/index" /}
{block name="main"}
    {js href="/static/index/js/jquery.min.js" }
    {css href="/static/admin/css/bootstrap.min.css"}
    {css href="/static/home/css/style.css"}
    {css href="/static/home/css/userinfo-vendor.css"}
    {css href="/static/home/css/dm5_style.css"}

    {js href="/static/home/js/vendor.js"}
    {js href="/static/home/js/search.js"}
    {js href="/static/home/js/login.js"}
    {js href="/static/home/js/scripts.js"}
    {js href="/static/home/js/jquery.cookie.js"}
    {css href="/static/index/css/bootstrap.min.css" }
    {css href="/static/index/css/navbar-fixed-top.css" }
    {css href="/static/index/css/zjh.css" }
    {css href="/static/index/css/toastr.min.css"}
    {js href="/static/index/js/bootstrap.min.js" }
    {js href="/static/index/js/toastr.min.js"}
    <!-- 收藏ajax操作 -->
    {js href="/static/home/js/comics-dm5v3.js"}
    {js href="/static/home/js/comm.js"}
<body class="white">
<!-- 页面头部 -->

{css href="/static/home/css/share.css"}
{css href="/static/home/css/jquery-ui-1.7.3.custom.css"}
{js href="/static/home/js/newyb.js"}
{js href="/static/home/js/post.js"}
{js href="/static/home/js/mh-detail.js"}
{js href="/static/home/js/showcomic.js"}
<div class="">
    <section class="banner_detail">
        <div class="banner_border_bg">
            <img class="banner_detail_bg" src="http://mhfm7tel.cdndm5.com/39/38054/20170818205634_180x240_22.jpg" style="width: 100%;height:auto;filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=60, MakeShadow=false);"> </div>
        <div class="banner_detail_form">
            <div class="cover">
                <img src="/uploads/{$data1['pic']}"> </div>
            <div class="info">
                <p class="title"> {$data1['name']}
                    <span class="right">
                            <span class="score">综合评分: <span style="color: #ff3f60;"> {$data1['mark']}分</span></span>
                        </span>
                </p>
                <p class="subtitle">作者：
                    <a>{$data1['author']}</a>
                </p>
                <p class="tip">
                        <span class="block">状态：
                            <span>{$data1['status']==1 ? '连载中' : '已完结'}</span>
                        </span>
                    <span class="block"> 题材：
                            <a href="/manhua-xiaoyuan/">
                                <span>{$fname}</span>
                            </a>
                        </span>
                </p>
                <p class="content" style="position: relative;overflow : hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;">{$data1['detail']}</p>
                <div class="bottom" style="position: absolute;width: 850px;bottom: 30px;">
                    <!-- ajax操作 -->
                    <a href="javascript:void(0);" onclick="SetBookmarker(0,DM5_COMIC_MID,0,DM5_USERID)" class="btn-1 btn_collection"
                       id="btn_collection38054" mid="38054">


                       <button class="btn btn-danger btn-lg book-btn " book-id="{$id}">加入书架</button>


                       
                    <a id="share" href="javascript:void(0);" class="btn-4" onclick="$('#shareForm').toggle();">分享</a>
                    <span id="shareForm" class="shareDetail" style="display: none;">
                            <a href="http://service.weibo.com/share/share.php?url=http%3a%2f%2fwww.dm5.com%2fmanhua38054%2f&amp;title=%e6%80%9d%e6%85%95%e9%9b%aa%e7%9a%84%e7%83%ad%e5%b8%a6%e9%b1%bc|%e7%ac%ac23%e5%b1%8a%e7%94%b5%e5%87%bb%e6%96%87%e5%ba%93%e5%a4%a7%e8%b5%8f%e9%87%91%e8%b5%8f%e4%bd%9c%e5%93%81%ef%bc%8c%e8%ae%b2%e8%bf%b0%e4%ba%86%e7%94%b1%e7%ac%a8...&amp;pic=http://mhfm7tel.cdndm5.com/39/38054/20170818205634_180x240_22.jpg"
                               target="_blank">
                                <img src="http://css99tel.cdndm5.com/v201805251443/blue/images/new/detail_share_1.png" alt="微博">
                            </a>
                            <a href="javascript:void(0);" onclick="$('.weixin_div').show();$('.mask').show();">
                                <img src="http://css99tel.cdndm5.com/v201805251443/blue/images/new/detail_share_2.png" alt="微信">
                            </a>
                            <a href="http://connect.qq.com/widget/shareqq/index.html?url=http%3a%2f%2fwww.dm5.com%2fmanhua38054%2f&amp;title=%e6%80%9d%e6%85%95%e9%9b%aa%e7%9a%84%e7%83%ad%e5%b8%a6%e9%b1%bc&amp;summary=%e7%ac%ac23%e5%b1%8a%e7%94%b5%e5%87%bb%e6%96%87%e5%ba%93%e5%a4%a7%e8%b5%8f%e9%87%91%e8%b5%8f%e4%bd%9c%e5%93%81%ef%bc%8c%e8%ae%b2%e8%bf%b0%e4%ba%86%e7%94%b1%e7%ac%a8...&amp;pics=http://mhfm7tel.cdndm5.com/39/38054/20170818205634_180x240_22.jpg"
                               target="_blank">
                                <img src="http://css99tel.cdndm5.com/v201805251443/blue/images/new/detail_share_3.png" alt="QQ">
                            </a>
                            <a href="http://www.douban.com/recommend/?url=http%3a%2f%2fwww.dm5.com%2fmanhua38054%2f&amp;title=%e6%80%9d%e6%85%95%e9%9b%aa%e7%9a%84%e7%83%ad%e5%b8%a6%e9%b1%bc"
                               target="_blank">
                                <img src="http://css99tel.cdndm5.com/v201805251443/blue/images/new/detail_share_4.png" alt="豆瓣">
                            </a>
                            <span></span>
                            <em></em>
                        </span>
                </div>
            </div>
            <div style="clear: both;"></div>
        </div>
    </section>
</div>
<div class="view-comment" style="position: relative; min-height: 2760px;">
    <div class="container">
        <div class="view-comment-sub" style="position: relative; left: 0px; margin-left: 0px; bottom: 0px;">
            <div class="sub-manga">
                <div class="top">热门漫画
                    <span class="select">
                            <a class="active">周</a>
                </div>
                <ul class="list" id="sub-manga-1">
                    {volist name="datall" id="v"}
                    <li>
                        <div class="cover">
                            <a href="{:url('home/detail/read',['id'=>$v['id']])}" title="{$v.name}">
                                <img src="/uploads/{$v.pic}">
                            </a>
                        </div>
                        <div class="info">
                            <p class="title">
                                <a href="{:url('home/detail/read',['id'=>$v['id']])}" title="{$v.name}">{$v.name}</a>
                            </p>
                            <p class="subtitle-new"> {$v.detail|mb_substr=0,16}... </p>
                            <p class="tip">
                                <span>评分:</span>
                                <span style="color: #FF4545">{$v.mark}</span>
                            </p>
                        </div>
                    </li>
                    {/volist}
                </ul>
            </div>
            <div class="sub-manga">
                <div class="top">最近更新</div>
                <ul class="list">
                    {volist name="timeall" id="v"}
                    <li>
                        <div class="cover">
                            <a href="{:url('home/detail/read',['id'=>$v['id']])}" title="{$v.name}">
                                <img src="/uploads/{$v.pic}">
                            </a>
                        </div>
                        <div class="info">
                            <p class="title">
                                <a href="{:url('home/detail/read',['id'=>$v['id']])}" title="{$v.name}">{$v.name}</a>
                            </p>
                            <p class="subtitle-new"> {$v.detail|mb_substr=0,16}... </p>
                            <p class="tip">
                                <span>评分:</span>
                                <span>{$v.mark}</span>
                            </p>
                        </div>
                    </li>
                    {/volist}

                </ul>
            </div>
            <a href="/uploadmianze/">
                <img src="/static/home/images/upload-btn.png" style="margin-top:10px;">
            </a>
        </div>
        <div class="left-bar">
            <div id="tempc">
                <div class="detail-list-title">
                    <a href="javascript:void(0);" onclick="titleSelect(this, 'detail-list-select', 'detail-list-select-1');"
                       class="block active">连载
                        <span>（{$cid}）</span>
                    </a>
                    <span class="s">最新
                            <span>&nbsp;
                                <a href="/ch11-621019/" title="{$xin['name']}" style="color:#ff3f60;" target="_blank">{$xin['name']}</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;时间:&nbsp;&nbsp; {$xin['uptime']|date='Y-m-d H:i',###}</span>
                        </span>
                    <a href="javascript:void(0);" onclick="sortBtnClick(this);" class="order desc inverted">倒序</a>
                </div>
                <div id="chapterlistload">
                    <ul class="view-win-list detail-list-select" id="detail-list-select-1">
                        {volist name="mulu" id="v"}
                        <li>
                            <a href="{:url('home/mulu/mulu',['id'=>$v.id])}" title="{$v.name}" target="_blank">{$v.name}
                            </a>
                            <span class="new"></span>
                        </li>
                        {/volist}
                    </ul>

                </div>
            </div>

            <!-- 广告位 -->
            <div class="detail-ad">
                <div adgroupid="0" adid="185" aid="1398" class="cl760 clDiv" style="width:950px;height:90px;">

                </div>
            </div>

            <div class="index-title">
                <h2>看过《{$data1.name}》的人还看过</h2>
            </div>
            <div class="index-manga">
                <ul class="mh-list col7">
                    {volist name="zuo" id="v"}
                    <li>
                        <div class="mh-item">
                            <p class="mh-cover " style="background-image: url(/uploads/{$v.pic})">
                            </p>
                            <div class="mh-item-detali">
                                <h2 class="title">
                                    <a href="{:url('home/detail/read',['id'=>$v['id']])}" title="{$v.name}">{$v.name}</a>
                                </h2>
                                <p class="zl">{$v.detail}</p>
                                <p class="chapter">
                                    <span style="padding-right: 10px;">{$v['status']==1 ? '连载中' : '已完结'}</span>
                                    作者：<span style="color:#FF4545;">{$v['author']}</span>
                                </p>
                            </div>
                            <div class="mh-tip-wrap">
                                <div class="mh-item-tip">
                                    <a href="{:url('home/detail/read',['id'=>$v['id']])}" title="{$v.name}">
                                        <p class="mh-cover tip" style="background-image: url(/uploads/{$v.pic})">
                                        </p>
                                    </a>
                                    <div class="mh-item-tip-detali">
                                        <h2 class="title">
                                            <a href="{:url('home/detail/read',['id'=>$v['id']])}" title="{$v.name}">{$v.name}</a>
                                            <span class="mh-star star-3"></span>
                                        </h2>
                                        <p class="author">
                                            <span>作者：</span>
                                            <span>
                                                    <a>{$v['author']}</a>
                                                </span>
                                        </p>
                                        <p class="chapter">
                                            <span>{$v['status']==1 ? '连载中' : '已完结'}</span>
                                            <a href="{:url('home/detail/read',['id'=>$v['id']])}" title="冰冷的双足与热带夜 第1话" target="_blank">第1话 </a>
                                        </p>
                                        <div class="desc">{$v.detail} </div>
                                        <p>
                                            <button class="btn" title="{$v.name}" onclick="location.replace('{:url('home/detail/read',['id'=>$v['id']])}')">开始阅读</button>
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>
                    {/volist}
                </ul>
            </div>
        </div>
        <div class="view-comment-main" style="margin-top:5px;">
            <div class="top">
                <a href="javascript:void(0);" id="btnnewposts">
                    <span class="active">全部评论</span>
                </a>
                <span class="s commentcount">(共有{$zong}条评论)</span>
                <a href="javascript:void(0);" id="btnhotposts">
                    <span>最热评论</span>
                </a>
            </div>
            <ul class="list">
                <li>
                    <ul class="postlist">
                <!--评论-->
                        {volist name="comment" id="v"}
                        <li class="dashed">
                            <div class="cover">
                                <!--用户头像-->
                                <img src="http://manhua1028-61-174-50-140.cdndm5.com/userfile/5/avatars/2017/1/4/79868891/1/ef87dd12472d46bfbd0a783ba482f8ac_tmb_64x64.jpg">
                            </div>
                            <div class="info">
                                <p class="title">{$v.name}</p>
                                <p class="content">{$v.detail}</p>
                                <p class="bottom">{$v.time|date='Y-m-d H:i:s',###}
                                    <span class="right">
                                            <button style="border: none;background-color: #fff" data1-toggle="modal" data1-target="#myModal" class="zann" dataid="{$v.id}"><span class="sp{$v.id}">赞</span> &nbsp;&nbsp;<span class="zo{$v.id}">{$v.zan}</span></button>
                                        </span>
                                </p>
                            </div>
                        </li>
                        {/volist}
                    </ul>
                </li>
                <li>
                    <div class="cover">
                        <img src="http://css99tel.cdndm5.com/blue/images/mrtx.gif">
                    </div>
                    <div class="info">
                            <input type="hidden" name="mid" value="{$data1.id}" id="did">
                            <textarea class="comment-input js_max_text_length" name="comt" id="comt" placeholder="我来说两句..." onfocus="vv(this)" data1-toggle="modal" data1-target="#myModal"></textarea>
                            <p class="comment-item">
                                    <span class="right">
                                        <span>请您文明上网，理性发言，注意文明用语</span>
                                        <span class="red"></span>
                                        <span></span>

                                        <button class="btn btn-primary btn-lg fa-btn" style="line-height: 22px;">
                                          发表评论
                                        </button>

                                    </span>
                            </p>
                    </div>
                </li>
            </ul>
        {$comment->render()}
        </div>
        <!--广告位-->
        <div class="detail-ad">
            <div adgroupid="0" adid="185" aid="1398" class="cl760 clDiv" id="b4" style="width:950px;height:90px;">

            </div>

        </div>
    </div>

</div>


{js href="/static/home/js/ad_360_detail_20180104.js"}
<!--微信分享-->
<div class="mask"></div>
<div class="weixin_div">
    <img class="weixin_bak" src="http://css99tel.cdndm5.com/v201805251443/blue/images/new/weixin.png">
    <img class="weixin_code" src="/qrc.ashx?codetext=http%3a%2f%2fwww.dm5.com%2fmanhua38054%2f" width="155" height="151">
    <a href="javascript:void(0);" onclick="$('.weixin_div').hide();$('.mask').hide();">
        <img class="weixin_cross" src="http://css99tel.cdndm5.com/v201805251443/blue/images/new/weixin_cross.png">
    </a>
</div>

<div id="ui-dialog" class="ui-dialog ui-widget ui-widget-content ui-corner-all" tabindex="-1" role="dialog"
     aria-labelledby="ui-dialog-title-errorlog" style="display: none; position: absolute; overflow: hidden; z-index: 1002; outline: 0px; height: auto; width: 410px; top: 606px; left: 740.5px;">
    <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" unselectable="on">
        <span class="ui-dialog-title" id="ui-dialog-title-errorlog" unselectable="on">报告错误</span>
        <a href="#" class="ui-dialog-titlebar-close ui-corner-all" role="button" unselectable="on">
            <span class="ui-icon ui-icon-closethick" unselectable="on">close</span>
        </a>
    </div>
    <div class="gl_k mato10 ui-dialog-content ui-widget-content" style="width: auto; height: auto; min-height: 85px;font-size:14px;padding:8px;"
         id="errorlog">
        <p id="posting" style="display: none; text-align: center; color: Red"></p>
        <form id="errorform" name="errorform">
            <div class="gl_k_nr"> Email：
                <input type="text" class="srk1" id="txt_erroremail" name="txt_erroremail" style="width:324px;">
                <span class="zf00">*</span>
            </div>
            <div class="gl_k_nr"> 错误信息描述：</div>
            <div class="gl_k_nr">
                <textarea name="txt_errorcontent" id="txt_errorcontent" class="srk2" style="width: 360px;        height: 150px; font-size: 14px; padding: 5px;"></textarea>
            </div>
            <div class="gl_k_nr mar10">
                <span id="poststatus" style="color: Red"></span>
                <input type="hidden" id="tid" name="tid">
                <span class="flr">
                        <input type="button" value="确认提交" class="lanan" id="usererror_postbt" onclick="return posterrorajax();">
                    </span>
            </div>
        </form>
    </div>
</div>


<script>




    function vv(obj){
            // console.log("{$email}".length);
            if ("{$email}".length == 0) {
                // alert('请先登陆');
                obj.blur();
            }else{
                obj.removeAttribute('data1-toggle');
                obj.removeAttribute('data1-target');

            }
        }


        $(function(){
            $('.fa-btn').click(function(){
                var tt = $('#did').val();
                var bb = $('#comt').val();
                $.ajax({
                    type:'post',
                    url:'/zans',
                    data1:{
                        "mid":tt,
                        "detail":bb
                    },
                    traditional:true,
                    success:function(data1){
                        if (data1.status){
                            // alert('评论成功');
                            $('.postlist').append("<li class='dashed'>" +
                                "<div class='cover'>" +
                                "<img src=\'http://manhua1028-61-174-50-140.cdndm5.com/userfile/5/avatars/2017/1/4/79868891/1/ef87dd12472d46bfbd0a783ba482f8ac_tmb_64x64.jpg\'>" +
                                "</div>" +
                                "<div class='info'>" +
                                "<p class='title'>"+data1.name+"</p>" +
                                "<p class='content'>"+data1.detail+"</p>" +
                                "<p class='bottom'>"+ data1.tie +
                                "<span class='right'>" +
                                "<button style=\"border: none;background-color: #fff\" data1-toggle=\"modal\" data1-target=\"#myModal\" class=\"zann\" dataid="+data1.id+"><span class=\"sp"+data1.id+"\">赞</span> &nbsp;&nbsp;<span class=\"zo"+data1.id+"\">"+data1.zang+"</span></button>" +
                                "</span></p></div></li>");
                            $('#comt').val('');
                        }else{
                            alert('评论不能为空');
                        }
                    },
                    error:function(){
                        alert('AJAX传输错误');
                    }

                });


            });



            $('.zann').click(function(){
                // console.log($(this));
                if ("{$email}".length == 0) {
                    $(this).blur();
                }else{
                    $(this).removeAttr('data1-toggle');
                    $(this).removeAttr('data1-target');
                    var dataid = $(this).attr('dataid');
                    var dazan = $(this).children().eq(0).text();
                    var len = dazan.length;
                    addzan(dataid,len);

                }
            });


            function addzan(dataid,len){
                $.ajax({
                    type:'put',
                    url:'/zans/'+dataid,
                    data1:{
                        'len':len
                    },
                    dataType:'json',
                    success:function(data1){
                        if (data1.status){
                            $('.sp'+data1.id).html(data1.infoo);
                            $('.zo'+data1.id).html(data1.zanzz);
                        } else{
                            alert('操作错误');
                        }
                    },
                    error:function(){
                        alert('AJAX传输错误');
                    }

                })
            }






        });

$(function(){
       //    弹框参数
       toastr.options = {
           closeButton: true,
           progressBar: true,
           timeOut: "2000",
           positionClass: "toast-top-right"
       };
   //    触发加入书架
       $('.book-btn').click(function(){
           var book_id = $(this).attr('book-id');
           if(confirm('确定加入书架？')){
              do_bookmarker(book_id);
           }
       })
   })

    function do_bookmarker(id){
       $.ajax({
           type:'get',
           url:'/bookmarkers/'+id,
           dataType : 'json',
           success:function(data1){
               if(data1.status){
                   toastr.success(data1.info);
               }else{
                   toastr.error(data1.info, 'WARING!!!!!!:');
               }
           },
           error:function(data1){
               alert('AJAX操作失败');
           }
       })
    }

</script>

{/block}